Fsharp tests#2626
Draft
licon4812 wants to merge 17 commits into
Draft
Conversation
…idation, Requirements, Results, Modules) (#1) * Convert C# Attributes unit tests to F# Add F# equivalents for 13 test files in the Attributes folder: - CliToolAttributeTests.fs - DotNetFormatOptionsTests.fs - DynamicDependencyIntegrationTests.fs - EnumValueAttributeTests.fs - LifecycleEventIntegrationTests.fs - LinuxOnlyTestAttribute.fs - MetadataCrossPhaseIntegrationTests.fs - ModuleAttributeEventServiceTests.fs - ModuleDependencyRegistryTests.fs - ModuleMetadataRegistryTests.fs - ModuleReadyEventTests.fs - ModuleRegistrationContextTests.fs - WindowsOnlyTestAttribute.fs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * Add F# unit test conversions for Models, State, Validation, Requirements, Results, Modules Convert 18 C# unit test files to idiomatic F# equivalents in test/ModularPipelines.UnitTests.FSharp/: - Models/: MyModel.fs, CommandLineTests.fs, JsonSerializationTests.fs, KeyValueTests.fs, RequirementDecisionTests.fs, SkipDecisionTests.fs, TrxParsingTests.fs - State/: ModuleExecutionPhaseTests.fs, ModuleStateStoreTests.fs, ModuleStateTransitionsTests.fs - Validation/: ValidationInterfaceTests.fs, ValidationTests.fs - Requirements/: PipelineRequirementBaseClassTests.fs, RequireFactoryTests.fs - Results/: ResultsRepositoryTests.fs, ReturnNothingTests.fs - Modules/: SyncModuleTests.fs, TestModule1.fs - Updated .fsproj with wildcard compile entries for all 6 new directories Note: Build has remaining errors to fix (assertion extension methods, ModuleStateSnapshot required properties). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * fix F# unit test build regressions Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/7e44fb1f-68fb-4d1a-93a9-59d8e808e306 Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * address F# test review follow-ups Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/7e44fb1f-68fb-4d1a-93a9-59d8e808e306 Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * tighten F# state test cleanup Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/7e44fb1f-68fb-4d1a-93a9-59d8e808e306 Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * finalize F# event handler cleanup Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/7e44fb1f-68fb-4d1a-93a9-59d8e808e306 Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * fix remaining F# attribute test build errors Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/c9451e79-96d6-4d20-91e7-5a00f713e05c Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * normalize F# metadata event formatting Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/c9451e79-96d6-4d20-91e7-5a00f713e05c Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * Update ResultsRepositoryTests.fs * complete F# CliAttributeTests conversion Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/d613e767-c418-4b8e-b79b-44c5ebf97bcf Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * guard mixed cli attribute ordering assertion Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/d613e767-c418-4b8e-b79b-44c5ebf97bcf Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * avoid unsafe head access in cli attribute test Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/d613e767-c418-4b8e-b79b-44c5ebf97bcf Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * Fixed FSharp Attribute tests namespace * finish F# state and validation test conversions Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/34b9a83f-ebc5-4758-bdda-fe0ee0581f30 Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * return non-null result in self-referencing validation module Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/34b9a83f-ebc5-4758-bdda-fe0ee0581f30 Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: James Alickolli <jalickolli@gmail.com>
… test port fixes (#2) * Generate F# wrappers for remaining unit tests Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/114fa639-5aec-4441-ae7b-fcb8805d5cf1 Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * Revert "Generate F# wrappers for remaining unit tests" This reverts commit c67143b. Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * WIP generated remaining F# test wrappers Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/114fa639-5aec-4441-ae7b-fcb8805d5cf1 Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * Remove wrapper infrastructure from F# test project Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/f3923578-41dc-4b47-a511-c38bd6c1a1e3 Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * Fix F# test project build regressions Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/ad0e9a0f-5d99-4bf8-af61-f7294d9e6656 Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * Restore native F# tests and fix many compile errors Agent-Logs-Url: https://github.com/licon4812/ModularPipelines/sessions/4701a5ec-874f-499d-9b7c-13fd34d69e45 Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> * Fixed build errors * More build fixes --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: licon4812 <32421608+licon4812@users.noreply.github.com> Co-authored-by: James Alickolli <jalickolli@gmail.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | ✅ 0 (≤ 20 complexity) |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Contributor
Author
|
Sorry, accidental click |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces F# support to the solution by adding F# unit tests and updating project references and dependencies accordingly. The main changes include the addition of a new F# test project, updates to the solution and project files to integrate it, and the inclusion of necessary F#-related NuGet packages.
F# Support and Test Infrastructure:
Added a new F# test project
ModularPipelines.UnitTests.FSharpto the solution, providing F#-based unit tests for API surface and attribute event invocation. (ModularPipelines.sln,test/ModularPipelines.UnitTests.FSharp/Api/FlexibleDependencyApiExportTests.fs,test/ModularPipelines.UnitTests.FSharp/Attributes/AttributeEventInvokerTests.fs) [1] [2] [3] [4] [5]Updated
ModularPipelines.csprojto allow the new F# test project access to internal members viaInternalsVisibleTo.Dependency Management:
FSharp.CoreandTUnit.Assertions.FSharptoDirectory.Packages.propsfor F# test support. [1] [2]Solution Configuration:
These changes collectively enable writing and running F# unit tests alongside existing C# tests, improving test coverage and flexibility for the codebase.
Additional Notes
DependsOnModulesWithAttributebeing a generic typed attribute. Which unfortunatly FSharp does not support